package com.zlop.controller;

import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.zlop.common.response.RestfulResponse;
import com.zlop.facade.TransFacade;

@RestController
public class TestController {

	/** 交易Facade */
	@Autowired
	private TransFacade transFacade;

	@GetMapping(value = "test", produces="text/plain;charset=UTF-8")
	public RestfulResponse<Void> test(String accountOut, String accountIn, Long transAmount){
		String uniqId = UUID.randomUUID().toString();
		return transFacade.transfer(accountOut, accountIn, uniqId, transAmount);
	}
	
}
